<form method="post" action="<?php echo $this->url_index; ?>"  enctype="multipart/form-data">
<ul id="myTab" class="nav nav-tabs pattern" style="margin-bottom: 0px;">
		<li class="active"><a href="#home" data-toggle="tab">Tổng quan</a></li>
			<li><a href="#conf_parameter" data-toggle="tab">Cấu hình tham số</a></li>
			<li><a href="#conf_cache" data-toggle="tab">Cấu hình Cache</a></li>
			<li><a href="#conf_images" data-toggle="tab">Cấu hình cache hình ảnh</a></li>
			<li><a href="#conf_email" data-toggle="tab">Email</a></li>
			<li> 
                   <input type="submit" name="send" class="btn btn-primary" value="Lưu"/>
			 
                
</li>
</ul>
<div class="tab-content" style="margin-top: 0px;">

<div  class="tab-pane fade in active" id="home">
<div class="span12 ">
        
            <div class="table_head" style="margin-top: 0px;"><h6><i class="icon-list-alt"></i>Thông tin cơ bản</h6></div>
            <div class="subcont">
                <ul class="details span10">
				<?php
				$confs = $config['home'];
				foreach($confs as $conf){
				?>
					 <li><?php echo $this->atheme->group_input2('conf['.$conf->CONF_CODE.']', $conf->CONF_TITLE.': ', '', 'span6', @$conf->CONF_VALUE, 'text', ''); ?></li>
				<?php }?>
                </ul>
                <br clear="both">

            </div>
    </div>

</div>



<div  class="tab-pane fade in" id="conf_parameter">
<div class="span12 ">
        
            <div class="table_head" style="margin-top: 0px;"><h6><i class="icon-list-alt"></i>Cấu hình tham số&nbsp;&nbsp;</h6></div>
            <div class="subcont">
               <ul class="details span10">
				<?php
				$confs = $config['num'];
				if(count($confs)>0)
				foreach($confs as $conf){
				?>
					 <li><?php echo $this->atheme->group_input2('conf['.$conf->CONF_CODE.']', $conf->CONF_TITLE.': ', '', 'span2', @$conf->CONF_VALUE, 'text', ''); ?></li>
				<?php }?>
                </ul>
                <br clear="both">

            </div>
    </div>

</div>




<div  class="tab-pane fade in" id="conf_cache">
<div class="span12 ">
        
            <div class="table_head" style="margin-top: 0px;"><h6><i class="icon-list-alt"></i>Cấu hình cache&nbsp;&nbsp;</h6><i>(thời gian tính theo phút (minutes))</i></div>
            <div class="subcont">
                <ul class="details span10">
				<?php
				$confs = @$config['cache'];
				if(count($confs)>0)
				foreach($confs as $conf){
				?>
					 <li><?php echo $this->atheme->group_input2('conf['.$conf->CONF_CODE.']', $conf->CONF_TITLE.': ', '', 'span2', @$conf->CONF_VALUE, 'text', ''); ?></li>
				<?php }?>
                </ul>
                <br clear="both">

            </div>
    </div>

</div>



<div  class="tab-pane fade in" id="conf_images">
<div class="span12 ">
        
            <div class="table_head" style="margin-top: 0px;"><h6><i class="icon-list-alt"></i>Cấu hình hình ảnh&nbsp;&nbsp;</h6><i>W x H (đơn vị tính theo px, 0 là không set)</i></div>
            <div class="subcont">
                <ul class="details span10">
				<?php
				$images = array(
					array(
						'title'=>'Cỡ hình icon của danh mục:',
						'width'=>'IMAGE_CATEGORY_THUMB_WIDTH',
						'height'=>'IMAGE_CATEGORY_THUMB_HEIGHT',
					),
					array(
						'title'=>'Cỡ hình icon của nhà sản xuất:',
						'width'=>'IMAGE_PUBLISHER_THUMB_WIDTH',
						'height'=>'IMAGE_PUBLISHER_THUMB_HEIGHT',
					),
					array(
						'title'=>'Cỡ hình icon của chương trình:',
						'width'=>'IMAGE_SOFT_ICON_WIDTH',
						'height'=>'IMAGE_SOFT_ICON_HEIGHT',
					),
					array(
						'title'=>'Cỡ hình thumb của chương trình:',
						'width'=>'IMAGE_SOFT_THUMB_WIDTH',
						'height'=>'IMAGE_SOFT_THUMB_HEIGHT',
					),
				);
				$confs = @$config['images'];
				$arr_config = array();
				foreach($confs as $conf){
					$arr_config[$conf->CONF_CODE] = (@$conf->CONF_VALUE)?$conf->CONF_VALUE:0;
				}
				if(count($images)>0)
				foreach($images as $image){
				?>
				<li><div class="row-form span12">
					<div class="span4"><label for="myid_<?php echo $image['width'];?>"><?php echo $image['title'];?></label></div>
					<div class="span6"><input type="text" id="myid_<?php echo $image['width'];?>" name="conf[<?php echo $image['width'];?>]" class="span2 valid" value="<?php echo $arr_config[$image['width']];?>">&nbsp;&nbsp;x&nbsp;&nbsp;<input type="text" id="myid_25" name="conf[<?php echo $image['height'];?>]" class="span2 valid" value="<?php echo $arr_config[$image['height']];?>"> &nbsp;&nbsp;<input type="button" value="Recache" class="btn btn-danger  btn-mini"></div>
					<div class="clear"></div>
				</div></li>

				<?php }?>
                </ul>
                <br clear="both">

            </div>
    </div>

</div>



<div  class="tab-pane fade in" id="conf_email">
<div class="span12 ">
        
            <div class="table_head" style="margin-top: 0px;"><h6><i class="icon-list-alt"></i>Cấu hình email</h6></div>
            <div class="subcont">
                <ul class="details span10">
				<?php
				$confs = $config['email'];
				if(count($confs)>0)
				foreach($confs as $conf){
				?>
					 <li><?php echo $this->atheme->group_input2('conf['.$conf->CONF_CODE.']', $conf->CONF_TITLE.': ', '', 'span6', @$conf->CONF_VALUE, 'text', ''); ?></li>
				<?php }?>
                </ul>
                <br clear="both">

            </div>
    </div>

</div>


</div>

  </form>




 